/**
  ETFAna project, Anyang Normal University && IMP-CAS
  \class ETFTimer1
  \brief a single-ended plastic scintillator
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022-04-26
  \date 2022-04-26 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2022-04-26   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021-2024 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTimer1_h
#define ETFTimer1_h

#include "ETFTimer.h"

class TClonesArray;
class ETFHPTDCCh;
class ETFPlaHit;

class ETFTimer1 : public ETFTimer{
public:
  ETFTimer1(){}
  ETFTimer1(const char *name, double length = 50.);
  virtual ~ETFTimer1(){}

  virtual void Assign(const ETFRawChannel *ch, unsigned uid) override; ///< add time ch

  virtual double GetTime() const override; ///< get the timing signal of Tstart
  virtual int GetFiredStatus() const override; ///< \retval fHits[0]->GetFiredStatus()

  // ClassDefOverride(ETFTimer1, 0);

protected:
  /// \param vh: 0-1: v, h, 4: Q
  virtual void AddHit(const ETFRawChannel *ch, int vh);
};

#endif
